constructor(private _host: HTMLUListElement) { function loadEntry(parentPath: string, li: HTMLLIElement): Entry { var text = getLIText(li);
var name: string, fullPath: string;
if (text.charAt(0) === '/') { if (text.length < parentPath.length
&& text.slice(0, parentPath.length) === parentPath
&& text.charAt(parentPath.length) === '/') { name = text.slice(parentPath.length + 1);
fullPath = parentPath + text;
fullPath = parentPath + '/' + text;
var children = getChildren(fullPath, ul);
function getLIText(li: HTMLLIElement): string { for (var i = 0; i < li.childNodes.length; i++) { var node = li.childNodes.item(i);
if ((<HTMLElement>node).tagName) continue;
function getChildUL(li: HTMLLIElement): HTMLUListElement { for (var i = 0; i < li.children.length; i++) { var ul = li.children.item(i);
if (ul.tagName === 'UL' ||
(ul.tagName && ul.tagName.toLowerCase() == 'ul'))
return <HTMLUListElement>ul;
function getChildren(parentPath: string, ul: HTMLUListElement) {